#define _CRTDBG_MAP_ALLOC
#define _CRTDBG_MAPALLOC
#include <stdlib.h>
#include <crtdbg.h>


#include "main.h"

#include "AppDelegate.h"

int APIENTRY _tWinMain(HINSTANCE hInstance,
					   HINSTANCE hPrevInstance,
					   LPTSTR    lpCmdLine,
					   int       nCmdShow)
{
//   _CrtSetBreakAlloc(534);

	UNREFERENCED_PARAMETER(hPrevInstance);
	UNREFERENCED_PARAMETER(lpCmdLine);

//_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );

    // create the application instance
    ___game_namespace___::AppDelegate* app = new ___game_namespace___::AppDelegate();
    int nRes = cocos2d::CCApplication::sharedApplication().run();

    delete app;

    _CrtDumpMemoryLeaks();

    return nRes;
}
